#!/usr/bin/env ruby
# frozen_string_literal: true

require_relative "./../.env"

if ENV["ENUMERABLE_RB_ENV"] == "development"
  require "pathname"
  ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
    Pathname.new(__FILE__).realpath)

  require "rubygems"
  require "bundler/setup"

  load Gem.bin_path("flay", "flay")
else
  $stderr.puts "ERROR: flay should only be run during development"
  exit(1)
end
